<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		ScriptPlanet.eu															/
/	Site:			http://www.scriptplanet.eu												/
/	Email:			support@scriptplanet.eu													/
/	Support:		http://www.scriptplanet.eu/support										/
/	Copyright:		2011 (c) ScriptPlanet.eu												/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0001																	/
/																							/
/========================================== JooSam ========================================*/

// Joomla security
defined('_JEXEC') or die;

## Import Joomla Data
jimport('joomla.application.component.modeladmin');


class JoosamModelTextstring extends JModelAdmin{

	## Get Table
	public function getTable($type = 'Textstring', $prefix = 'JoosamTable', $config = array()){
		return JTable::getInstance($type, $prefix, $config);
	}
	
	## Get Form
	public function getForm($data = array(), $loadData = true){
		
		$form = $this->loadForm('com_joosam.textstring', 'Textstring', array('control' => 'jform', 'load_data' => $loadData));
		if (empty($form)){ return false; }
		return $form;
	}

	## Load Form Data
	protected function loadFormData(){
		
		$data = JFactory::getApplication()->getUserState('com_joosam.edit.textstring.data', array());
		if (empty($data)){ $data = $this->getItem(); }
		return $data;
	}
}
?>